<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <title>微信小程序 | web前端面试题集锦</title>
  <meta name="keywords" content=" minapp ">
  <meta name="description" content="微信小程序 | web前端面试题集锦">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<meta property="og:type" content="website">
<meta property="og:title" content="categories">
<meta property="og:url" content="http://blog.duans.top/categories/index.html">
<meta property="og:site_name" content="web前端面试题集锦">
<meta property="og:locale" content="zh">
<meta property="article:published_time" content="2020-03-25T03:44:47.000Z">
<meta property="article:modified_time" content="2020-03-25T03:45:03.696Z">
<meta property="article:author" content="duans">
<meta name="twitter:card" content="summary">


<link rel="icon" href="/img/avatar.jpg">

<link href="/css/style.css?v=1.0.1" rel="stylesheet">

<link href="/css/hl_theme/github.css?v=1.0.1" rel="stylesheet">

<link href="//cdn.bootcss.com/animate.css/3.5.2/animate.min.css" rel="stylesheet">
<link href="//cdn.bootcss.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet">

<script src="//cdn.bootcss.com/jquery/2.2.4/jquery.min.js"></script>
<script src="/js/jquery.autocomplete.min.js?v=1.0.1" ></script>

<script src="//cdn.bootcss.com/highlight.js/9.12.0/highlight.min.js"></script>
<script>
    hljs.initHighlightingOnLoad();
</script>

<script src="//cdn.bootcss.com/nprogress/0.2.0/nprogress.min.js"></script>



<script src="/js/iconfont.js?v=1.0.1" ></script>

<meta name="generator" content="Hexo 4.2.0"></head>
<div style="display: none">
  <input class="theme_disqus_on" value="false">
  <input class="theme_preload_comment" value="true">
  <input class="theme_blog_path" value="">
</div>

<body>
<aside class="nav">
    <div class="nav-left">
        <a href="/" class="avatar_target">
    <img class="avatar" src="/img/avatar.jpg" />
</a>
<div class="author">
    <span>duans</span>
</div>

<div class="icon">
    
        
        <a title="oschina" href="https://gitee.com/duans" target="_blank">
            
                <svg class="iconfont-svg" aria-hidden="true">
                    <use xlink:href="#icon-oschina"></use>
                </svg>
            
        </a>
        
    
        
        <a title="jianshu" href="https://www.jianshu.com/u/6345254fa137" target="_blank">
            
                <svg class="iconfont-svg" aria-hidden="true">
                    <use xlink:href="#icon-jianshu"></use>
                </svg>
            
        </a>
        
    
        
        <a title="github" href="https://github.com/duanshaobo" target="_blank">
            
                <svg class="iconfont-svg" aria-hidden="true">
                    <use xlink:href="#icon-github"></use>
                </svg>
            
        </a>
        
    
        
        <a title="email" href="mailto:duanshaobo@126.com" target="_blank">
            
                <svg class="iconfont-svg" aria-hidden="true">
                    <use xlink:href="#icon-email"></use>
                </svg>
            
        </a>
        
    
</div>




<ul>
    <li><div class="all active">全部文章<small>(22)</small></div></li>
    
        
            
            <li><div data-rel="web前端"><i class="fold iconfont icon-right"></i>web前端<small>(16)</small></div>
                
                    <ul class="sub hide">
                        
                        <li><div data-rel="前端面试题">前端面试题<small>(16)</small></div>
                            
                        </li>
                            
                    </ul>
                
            </li>
            
        
    
        
            
            <li><div data-rel="web服务器">web服务器<small>(2)</small></div>
                
            </li>
            
        
    
        
            
            <li><div data-rel="数据库">数据库<small>(2)</small></div>
                
            </li>
            
        
    
        
            
            <li><div data-rel="web后端">web后端<small>(2)</small></div>
                
            </li>
            
        
    
        
            
        
    
</ul>
<div class="left-bottom">
    <div class="menus">
    
    
    
    
    </div>
    <div></div>
</div>
<input type="hidden" id="yelog_site_posts_number" value="22">

<div style="display: none">
    <span id="busuanzi_value_site_uv"></span>
    <span id="busuanzi_value_site_pv"></span>
</div>

    </div>
    <div class="nav-right">
        <div class="friends-area">
    <div class="friends-title">
        友情链接
        <i class="back-title-list"></i>
    </div>
    <div class="friends-content">
        <ul>
            
            <li><a target="_blank" href="https://www.duans.top/">duans</a></li>
            
        </ul>
    </div>
</div>
        <div class="title-list">
    <form onkeydown="if(event.keyCode === 13){return false;}">
        <input id="local-search-input" class="search" type="text" placeholder="Search..." />
        <i class="cross"></i>
        <span>
            <label for="tagswitch">Tags:</label>
            <input id="tagswitch" type="checkbox" style="display: none" />
            <i id="tagsWitchIcon"></i>
        </span>
    </form>
    <div class="tags-list">
    
    <li class="article-tag-list-item">
        <a class="color4">vue</a>
    </li>
    
    <li class="article-tag-list-item">
        <a class="color5">前端基础</a>
    </li>
    
    <li class="article-tag-list-item">
        <a class="color1">react</a>
    </li>
    
    <li class="article-tag-list-item">
        <a class="color2">minapp</a>
    </li>
    
    <li class="article-tag-list-item">
        <a class="color1">javascript</a>
    </li>
    
    <li class="article-tag-list-item">
        <a class="color3">angular</a>
    </li>
    
    <li class="article-tag-list-item">
        <a class="color3">mongodb</a>
    </li>
    
    <li class="article-tag-list-item">
        <a class="color2">jquery</a>
    </li>
    
    <li class="article-tag-list-item">
        <a class="color1">nginx</a>
    </li>
    
    <li class="article-tag-list-item">
        <a class="color1">mysql</a>
    </li>
    
    <li class="article-tag-list-item">
        <a class="color2">apache</a>
    </li>
    
    <li class="article-tag-list-item">
        <a class="color2">webapi</a>
    </li>
    
    <li class="article-tag-list-item">
        <a class="color5">性能优化</a>
    </li>
    
    <li class="article-tag-list-item">
        <a class="color5">ajax</a>
    </li>
    
    <li class="article-tag-list-item">
        <a class="color1">html5</a>
    </li>
    
    <li class="article-tag-list-item">
        <a class="color5">css3</a>
    </li>
    
    <li class="article-tag-list-item">
        <a class="color4">es6</a>
    </li>
    
    <li class="article-tag-list-item">
        <a class="color4">es7</a>
    </li>
    
    <li class="article-tag-list-item">
        <a class="color4">es8</a>
    </li>
    
    <li class="article-tag-list-item">
        <a class="color5">代码分析</a>
    </li>
    
    <li class="article-tag-list-item">
        <a class="color5">js基础</a>
    </li>
    
    <li class="article-tag-list-item">
        <a class="color5">构建工具</a>
    </li>
    
    <li class="article-tag-list-item">
        <a class="color1">混合app</a>
    </li>
    
    <li class="article-tag-list-item">
        <a class="color5">混合开发</a>
    </li>
    
    <li class="article-tag-list-item">
        <a class="color5">webSocket</a>
    </li>
    
    <div class="clearfix"></div>
</div>

    
    <nav id="title-list-nav">
        
        <a  class="web后端 "
           href="/2020/03/24/server/nodejs/"
           data-tag=""
           data-author="" >
            <span class="post-title" title="nodejs">nodejs</span>
            <span class="post-date" title="2020-03-24 15:40:21">2020/03/24</span>
        </a>
        
        <a  class="web前端 前端面试题 "
           href="/2020/03/24/client/angular/"
           data-tag="angular"
           data-author="" >
            <span class="post-title" title="angular">angular</span>
            <span class="post-date" title="2020-03-24 11:56:09">2020/03/24</span>
        </a>
        
        <a  class="web前端 前端面试题 "
           href="/2020/03/24/client/javascript/"
           data-tag="javascript"
           data-author="" >
            <span class="post-title" title="javascript基础">javascript基础</span>
            <span class="post-date" title="2020-03-24 11:43:12">2020/03/24</span>
        </a>
        
        <a  class="web前端 前端面试题 "
           href="/2020/03/24/client/jquery/"
           data-tag="jquery"
           data-author="" >
            <span class="post-title" title="jquery">jquery</span>
            <span class="post-date" title="2020-03-24 11:44:09">2020/03/24</span>
        </a>
        
        <a  class="web前端 前端面试题 "
           href="/2020/03/24/client/minapp/"
           data-tag="minapp"
           data-author="" >
            <span class="post-title" title="微信小程序">微信小程序</span>
            <span class="post-date" title="2020-03-24 11:00:34">2020/03/24</span>
        </a>
        
        <a  class="web前端 前端面试题 "
           href="/2020/03/24/client/react/"
           data-tag="react"
           data-author="" >
            <span class="post-title" title="react">react</span>
            <span class="post-date" title="2020-03-24 10:58:53">2020/03/24</span>
        </a>
        
        <a  class="web前端 前端面试题 "
           href="/2020/03/24/client/vue/"
           data-tag="vue"
           data-author="" >
            <span class="post-title" title="vue">vue</span>
            <span class="post-date" title="2020-03-24 10:59:46">2020/03/24</span>
        </a>
        
        <a  class="web前端 前端面试题 "
           href="/2020/03/24/client/websocket/"
           data-tag="webSocket"
           data-author="" >
            <span class="post-title" title="webSocket">webSocket</span>
            <span class="post-date" title="2020-03-24 13:17:01">2020/03/24</span>
        </a>
        
        <a  class="web前端 前端面试题 "
           href="/2020/03/24/client/web-base/"
           data-tag="前端基础"
           data-author="" >
            <span class="post-title" title="web前端基础">web前端基础</span>
            <span class="post-date" title="2020-03-24 10:59:46">2020/03/24</span>
        </a>
        
        <a  class="web后端 "
           href="/2020/03/24/server/php/"
           data-tag=""
           data-author="" >
            <span class="post-title" title="php">php</span>
            <span class="post-date" title="2020-03-24 15:42:33">2020/03/24</span>
        </a>
        
        <a  class="web服务器 "
           href="/2020/03/24/server/nginx/"
           data-tag="nginx"
           data-author="" >
            <span class="post-title" title="nginx">nginx</span>
            <span class="post-date" title="2020-03-24 15:43:15">2020/03/24</span>
        </a>
        
        <a  class="web服务器 "
           href="/2020/03/24/server/apache/"
           data-tag="apache"
           data-author="" >
            <span class="post-title" title="apache">apache</span>
            <span class="post-date" title="2020-03-24 15:43:29">2020/03/24</span>
        </a>
        
        <a  class="数据库 "
           href="/2020/03/24/server/mysql/"
           data-tag="mysql"
           data-author="" >
            <span class="post-title" title="mysql">mysql</span>
            <span class="post-date" title="2020-03-24 15:46:19">2020/03/24</span>
        </a>
        
        <a  class="数据库 "
           href="/2020/03/24/server/mongodb/"
           data-tag="mongodb"
           data-author="" >
            <span class="post-title" title="mongodb">mongodb</span>
            <span class="post-date" title="2020-03-24 15:46:36">2020/03/24</span>
        </a>
        
        <a  class="web前端 前端面试题 "
           href="/2020/03/25/client/webapi/"
           data-tag="webapi"
           data-author="" >
            <span class="post-title" title="webapi">webapi</span>
            <span class="post-date" title="2020-03-25 14:41:05">2020/03/25</span>
        </a>
        
        <a  class="web前端 前端面试题 "
           href="/2020/03/25/client/optimize/"
           data-tag="性能优化"
           data-author="" >
            <span class="post-title" title="前端性能优化">前端性能优化</span>
            <span class="post-date" title="2020-03-25 15:35:20">2020/03/25</span>
        </a>
        
        <a  class="web前端 前端面试题 "
           href="/2020/03/25/client/ajax/"
           data-tag="ajax"
           data-author="" >
            <span class="post-title" title="ajax数据交互">ajax数据交互</span>
            <span class="post-date" title="2020-03-25 15:40:58">2020/03/25</span>
        </a>
        
        <a  class="web前端 前端面试题 "
           href="/2020/03/25/client/h5c3/"
           data-tag="html5,css3"
           data-author="" >
            <span class="post-title" title="h5c3新特性">h5c3新特性</span>
            <span class="post-date" title="2020-03-25 15:50:04">2020/03/25</span>
        </a>
        
        <a  class="web前端 前端面试题 "
           href="/2020/03/25/client/es678/"
           data-tag="es6,es7,es8"
           data-author="" >
            <span class="post-title" title="ES6/7/8">ES6/7/8</span>
            <span class="post-date" title="2020-03-25 15:57:17">2020/03/25</span>
        </a>
        
        <a  class="web前端 前端面试题 "
           href="/2020/03/25/client/analysis/"
           data-tag="代码分析,js基础"
           data-author="" >
            <span class="post-title" title="js代码分析">js代码分析</span>
            <span class="post-date" title="2020-03-25 16:22:27">2020/03/25</span>
        </a>
        
        <a  class="web前端 前端面试题 "
           href="/2020/03/25/client/devtools/"
           data-tag="构建工具"
           data-author="" >
            <span class="post-title" title="前端构建工具">前端构建工具</span>
            <span class="post-date" title="2020-03-25 16:39:16">2020/03/25</span>
        </a>
        
        <a  class="web前端 前端面试题 "
           href="/2020/03/25/client/hybird/"
           data-tag="混合app,混合开发"
           data-author="" >
            <span class="post-title" title="混合开发">混合开发</span>
            <span class="post-date" title="2020-03-25 16:57:29">2020/03/25</span>
        </a>
        
    </nav>
</div>
    </div>
    <div class="hide-list">
        <div class="semicircle">
            <div class="brackets first"><</div>
            <div class="brackets">&gt;</div>
        </div>
    </div>
</aside>
<div class="post">
    <div class="pjax">
        <article id="post-client/minapp" class="article article-type-post" itemscope itemprop="blogPost">
    
        <h1 class="article-title">微信小程序</h1>
    
    <div class="article-meta">
        
        
        
        <span class="book">
            
                <a  data-rel="web前端">web前端</a>/
            
                <a  data-rel="前端面试题">前端面试题</a>
            
        </span>
        
        
        <span class="tag">
            
            <a class="color2">minapp</a>
            
        </span>
        
    </div>
    <div class="article-meta">
        
        创建时间:<time class="date" title='更新时间: 2020-03-25 15:31:35'>2020-03-24 11:00</time>
        
    </div>
    <div class="article-meta">
        
        
        <span id="busuanzi_container_page_pv">
            阅读:<span id="busuanzi_value_page_pv">
                <span class="count-comment">
                    <span class="spinner">
                      <div class="cube1"></div>
                      <div class="cube2"></div>
                    </span>
                </span>
            </span>
        </span>
        
        
        <span class="top-comment" title="跳转至评论区">
            <a href="#comments">
                评论:<span class="count-comment">
                    <span class="spinner">
                      <div class="cube1"></div>
                      <div class="cube2"></div>
                    </span>
                </span>
            </a>
        </span>
        
    </div>
    
    <div class="toc-ref">
    
        <ol class="toc"><li class="toc-item toc-level-2"><a class="toc-link" href="#微信小程序目前有几种主流的开发模式"><span class="toc-text">微信小程序目前有几种主流的开发模式?</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#简单介绍微信小程序的开发过程"><span class="toc-text">简单介绍微信小程序的开发过程</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#微信小程序中的tabbar导航如何制作"><span class="toc-text">微信小程序中的tabbar导航如何制作</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#微信小程序中如何实现页面跳转"><span class="toc-text">微信小程序中如何实现页面跳转?</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#简单描述微信小程序的生命周期"><span class="toc-text">简单描述微信小程序的生命周期?</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#微信小程序中如何请求数据接口"><span class="toc-text">微信小程序中如何请求数据接口?</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#如何优化小程序代码包的体积"><span class="toc-text">如何优化小程序代码包的体积?</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#你了解到微信小程序有哪些组件库"><span class="toc-text">你了解到微信小程序有哪些组件库?</span></a></li></ol>
    
<style>
    .left-col .switch-btn,
    .left-col .switch-area {
        display: none;
    }
    .toc-level-3 i,
    .toc-level-3 ol {
        display: none !important;
    }
</style>
</div>
    
    <div class="article-entry" itemprop="articleBody">
      
        <h2 id="微信小程序目前有几种主流的开发模式"><a href="#微信小程序目前有几种主流的开发模式" class="headerlink" title="微信小程序目前有几种主流的开发模式?"></a>微信小程序目前有几种主流的开发模式?</h2><p>微信官方:<br>原生方式;<br>wepy(微信官方推出的开发框架, 为了迎合目前主流前端框架的语法和提高开发效率);<br>第三方公司:<br>mpvue(使用vue的语法开发小程序, 是一个阉割版的vue)<br>uni-app(使用vue的语法进行开发, 是一个阉割版的vue, 据说一套代码可以编译出运行在多个平台的应用)</p>
<h2 id="简单介绍微信小程序的开发过程"><a href="#简单介绍微信小程序的开发过程" class="headerlink" title="简单介绍微信小程序的开发过程"></a>简单介绍微信小程序的开发过程</h2><p>首先得注册以为微信小程序, 因为小程序开发过程中需要一个appid;<br>其次下载腾讯官方的开发者工具(开发者工具必须使用个人微信登录), 小程序只能运行在开发这工具或者微信应用内部;<br>创建应用, 填入申请的appid, 即可快速生成小程序的项目结构.</p>
<h2 id="微信小程序中的tabbar导航如何制作"><a href="#微信小程序中的tabbar导航如何制作" class="headerlink" title="微信小程序中的tabbar导航如何制作"></a>微信小程序中的tabbar导航如何制作</h2><p>小程序中的tabbar底部导航是配置出来的, 只需要在应用配置文件中添加一个tabbar配置阶段, 按照官方文档配置即可, tabbar数量至少2个, 最多5个.</p>
<h2 id="微信小程序中如何实现页面跳转"><a href="#微信小程序中如何实现页面跳转" class="headerlink" title="微信小程序中如何实现页面跳转?"></a>微信小程序中如何实现页面跳转?</h2><p>小程序页面跳转:<br>使用组件<code>&lt;navigator url=”../home/home”&gt;目标页面&lt;/navigator&gt;</code><br>使用api: <code>wx.navigateTo({url:’../home/home’})</code><br>Tabbar页面跳转:<br><code>wx.switchTabbar({url:’../index/index’})</code><br>使用组件<code>&lt;navigator url=”../home/home” open-type=”switchTab”&gt;目标页面&lt;/navigator&gt;</code></p>
<h2 id="简单描述微信小程序的生命周期"><a href="#简单描述微信小程序的生命周期" class="headerlink" title="简单描述微信小程序的生命周期?"></a>简单描述微信小程序的生命周期?</h2><p>小程序的生命周期分为应用生命周期和页面生命周期.<br> 应用生命周期:<br><code>onLaunch</code>: 应用启动, 只执行一次;<br><code>onShow</code>: 应用切换到前台;<br><code>onHide</code>: 应用切换到后台模式;<br><code>noError</code>: 运行阶段出现错误;<br><code>onPageNotFound</code>: 找不到页面<br> 页面生命周期:<br><code>onLoad</code>: 页面开始加载;<br><code>onReady</code>: 页面加载完毕;<br><code>onShow</code>: 页面进入焦点状态;<br><code>onHide</code>: 页面进入后台状态</p>
<h2 id="微信小程序中如何请求数据接口"><a href="#微信小程序中如何请求数据接口" class="headerlink" title="微信小程序中如何请求数据接口?"></a>微信小程序中如何请求数据接口?</h2><p>通过wx.request</p>
<figure class="highlight js"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br></pre></td><td class="code"><pre><code class="hljs js">wx.request(&#123;<br>    url: <span class="hljs-string">'test.php'</span>,<br>    data: &#123;<br>        x: <span class="hljs-string">''</span>,<br>        y: <span class="hljs-string">''</span><br>    &#125;,  <br>    header: &#123;<br>        <span class="hljs-comment">/*默认请求头*/</span><br>        <span class="hljs-string">'content-type'</span>: <span class="hljs-string">'application/json'</span><br>    &#125;,<br>    success(res) &#123;<br>        <span class="hljs-built_in">console</span>.log(res.data)<br>    &#125;<br>&#125;)<br></code></pre></td></tr></table></figure>

<h2 id="如何优化小程序代码包的体积"><a href="#如何优化小程序代码包的体积" class="headerlink" title="如何优化小程序代码包的体积?"></a>如何优化小程序代码包的体积?</h2><p>分包加载,使用分包加载可以让小程序代码包体积达到8M(最多四个分包,每个分包最大2M);将资源文件尽量放在远程服务器端.</p>
<h2 id="你了解到微信小程序有哪些组件库"><a href="#你了解到微信小程序有哪些组件库" class="headerlink" title="你了解到微信小程序有哪些组件库?"></a>你了解到微信小程序有哪些组件库?</h2><p><code>Vant Weapp, iview Weapp, minui, WeUI, iview-mpvue</code></p>

      
       <hr><span style="font-style: italic;color: gray;"> 请你也把我遗弃在远方, 让我享受这可怕的绝望, 当你终于感到了悲伤, 我在回来为你歌唱 </span>
    </div>
</article>


<p>
    <a  class="dashang" onclick="dashangToggle()">赏</a>
</p>




    <div id="comments"></div>
<link rel="stylesheet" href="https://jjeejj.github.io/css/gitment.css">

<script src="/js/gitment.js"></script>

<script>
    var gitment = new Gitment({
        id: 'http://blog.duans.top/2020/03/24/client/minapp/', // 可选。默认为 location.href
        owner: 'duanshaobo',
        repo: 'blog.duans.top',
        oauth: {
            client_id: '76fd9510b156417889ed',
            client_secret: 'c63458b7f62b1b672250331443a554f3e8be05b3',
        },
    })
    gitment.render('comments')
</script>




    




    </div>
    <div class="copyright">
        <p class="footer-entry">Copyright©2020 www.duans.top</p>
<!-- <p class="footer-entry">Built with <a href="https://hexo.io/" target="_blank">Hexo</a> and <a href="https://github.com/yelog/hexo-theme-3-hexo" target="_blank">3-hexo</a> theme</p> -->

    </div>
    <div class="full-toc">
        <button class="full"><span class="min "></span></button>
<button class="post-toc-menu"><span class="post-toc-menu-icons"></span></button>
<div class="post-toc"><span class="post-toc-title">目录</span>
    <div class="post-toc-content">

    </div>
</div>
<a class="" id="rocket" ></a>

    </div>
</div>
<div class="acParent"></div>

<div class="hide_box" onclick="dashangToggle()"></div>
<div class="shang_box">
    <a class="shang_close"  onclick="dashangToggle()">×</a>
    <div class="shang_tit">
        <p>喜欢就点赞,疼爱就打赏</p>
    </div>
    <div class="shang_payimg">
        <div class="pay_img">
            <img src="/img/alipay.jpg" class="alipay" title="扫码支持">
            <img src="/img/weixin.jpg" class="weixin" title="扫码支持">
        </div>
    </div>
    <div class="shang_payselect">
        <span><label><input type="radio" name="pay" checked value="alipay">支付宝</label></span><span><label><input type="radio" name="pay" value="weixin">微信</label></span>
    </div>
</div>


</body>
<script src="/js/jquery.pjax.js?v=1.0.1" ></script>

<script src="/js/script.js?v=1.0.1" ></script>
<script>
    var img_resize = 'default';
    /*作者、标签的自动补全*/
    $(function () {
        $('.search').AutoComplete({
            'data': ['@duans','@duans','#vue','#前端基础','#react','#minapp','#javascript','#angular','#mongodb','#jquery','#nginx','#mysql','#apache','#webapi','#性能优化','#ajax','#html5','#css3','#es6','#es7','#es8','#代码分析','#js基础','#构建工具','#混合app','#混合开发','#webSocket',],
            'itemHeight': 20,
            'width': 418
        }).AutoComplete('show');
    })
    function initArticle() {
        /*渲染对应的表格样式*/
        

        /*渲染打赏样式*/
        
        $("input[name=pay]").on("click", function () {
            if($("input[name=pay]:checked").val()=="weixin"){
                $(".shang_box .shang_payimg .pay_img").addClass("weixin_img");
            } else {
                $(".shang_box .shang_payimg .pay_img").removeClass("weixin_img");
            }
        })
        

        /*高亮代码块行号*/
        

        /*访问数量*/
        
        $.getScript("//busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js");
        

        /*代码高亮，行号对齐*/
        $('.pre-numbering').css('line-height',$('.has-numbering').css('line-height'));

        
        
    }

    /*打赏页面隐藏与展示*/
    
    function dashangToggle() {
        $(".shang_box").fadeToggle();
        $(".hide_box").fadeToggle();
    }
    

</script>

<!--加入行号的高亮代码块样式-->

<!--自定义样式设置-->
<style>
    
    
    .nav {
        width: 582px;
    }
    .nav.fullscreen {
        margin-left: -582px;
    }
    .nav-left {
        width: 160px;
    }
    
    
    @media screen and (max-width: 1468px) {
        .nav {
            width: 532px;
        }
        .nav.fullscreen {
            margin-left: -532px;
        }
        .nav-left {
            width: 140px;
        }
    }
    
    
    @media screen and (max-width: 1024px) {
        .nav {
            width: 532px;
            margin-left: -532px
        }
        .nav.fullscreen {
            margin-left: 0;
        }
        .nav .hide-list.fullscreen {
            left: 532px
        }
    }
    
    @media screen and (max-width: 426px) {
        .nav {
            width: 100%;
        }
        .nav-left {
            width: 100%;
        }
    }
    
    
    .nav-right .title-list nav a .post-title, .nav-right .title-list #local-search-result a .post-title {
        color: #383636;
    }
    
    
    .nav-right .title-list nav a .post-date, .nav-right .title-list #local-search-result a .post-date {
        color: #5e5e5f;
    }
    
    
    .nav-right nav a.hover, #local-search-result a.hover{
        background-color: #e2e0e0;
    }
    
    

    /*列表样式*/
    
    .post .pjax article .article-entry>ol, .post .pjax article .article-entry>ul, .post .pjax article>ol, .post .pjax article>ul{
        border: #e2dede solid 1px;
        border-radius: 10px;
        padding: 10px 32px 10px 56px;
    }
    .post .pjax article .article-entry li>ol, .post .pjax article .article-entry li>ul,.post .pjax article li>ol, .post .pjax article li>ul{
        padding-top: 5px;
        padding-bottom: 5px;
    }
    .post .pjax article .article-entry>ol>li, .post .pjax article .article-entry>ul>li,.post .pjax article>ol>li, .post .pjax article>ul>li{
        margin-bottom: auto;
        margin-left: auto;
    }
    .post .pjax article .article-entry li>ol>li, .post .pjax article .article-entry li>ul>li,.post .pjax article li>ol>li, .post .pjax article li>ul>li{
        margin-bottom: auto;
        margin-left: auto;
    }
    

    /* 背景图样式 */
    
    


    /*引用块样式*/
    

    /*文章列表背景图*/
    
    .nav-right:before {
        content: ' ';
        display: block;
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        height: 100%;
        opacity: 0.4;
        background: url("/img/article-list-background-1.jpg");
        background-repeat: no-repeat;
        background-position: 50% 0;
        -ms-background-size: cover;
        -o-background-size: cover;
        -moz-background-size: cover;
        -webkit-background-size: cover;
        background-size: cover;
    }
    

    
    .post .pjax article :not(pre) > code {
        color: #24292e;
        font-family: SFMono-Regular,Consolas,Liberation Mono,Menlo,Courier,monospace;
        background-color: rgba(27,31,35,.05);
        border-radius: 3px;
        font-size: 85%;
        margin: 0;
        padding: .2em .4em;
    }
    
</style>







</html>
